/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.cyss.greenball.service;

import com.cyss.greenball.util.MemoryDataBase;
import com.cyss.greenball.util.SystemUtil;
import com.lianzt.commondata.AbstractCommonData;

/**
 *
 * @author cyss
 */
public class SubmitGreenBallMapService extends BaseService{

    @Override
    public AbstractCommonData execute(AbstractCommonData acd) {
        AbstractCommonData bacdAcd = null;
        AbstractCommonData greenBallMap = acd.getDataValue("map_data");
        if(greenBallMap != null){
            MemoryDataBase.insertGreenBall(greenBallMap);
            bacdAcd = SystemUtil.getBacdCommonData(SystemUtil.ServiceCodeAndDesc.get("success"));
        } else {
            bacdAcd = SystemUtil.getBacdCommonData(SystemUtil.ServiceCodeAndDesc.get("insertGreenBallFail"));
        }
        return bacdAcd;
    }
    
}
